package com.xiaojian.pick.controller;

import com.xiaojian.pick.entity.Proposal;
import com.xiaojian.pick.page.AjaxResult;
import com.xiaojian.pick.service.ProposalService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author whycode
 * @title: ProposalController
 * @projectName campus-secondary-market-app---sys
 * @description: TODO
 * @date 2022/4/110:17
 */

@RestController
@RequestMapping("/proposal")
public class ProposalController {

    @Resource
    private ProposalService proposalService;

    @PostMapping("/")
    @ResponseBody
    public AjaxResult save(@RequestBody Proposal proposal){

        proposalService.save(proposal);

        return new AjaxResult(true);
    }

}
